package com.zy.design.pattern.adapter.comb;

import com.zy.design.pattern.adapter.base.IFileSys;

/**
 * @author zhaoyi
 * @date 2021/4/14 17:02
 */
public class CephFileAdapter implements IFileSys {
    private CephFile cephFile;

    public CephFileAdapter(CephFile cephFile) {
        this.cephFile = cephFile;
    }

    @Override
    public void upFile(byte[] data, String path) {
        //使用组合的对象
        cephFile.putObject(data, path);
    }

    @Override
    public byte[] getFile(String path) {
        return cephFile.getObject(path);
    }
}
